<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
#parse("/linkandscript.html")
<title>论坛控</title>
</head>
<body>
	#parse("/boardcastemb.html")
    
    <div id="indexheaderdiv" style="background: #eceff1">
        <table border="0" class="center width996">
          <tr>
            <td><img src="/hezi/images/luntankong.jpg" width="301"/></td>
            <td></td>
            <td width="500px" id="slogantd" style="text-align:right">
                <div style="margin-bottom:10px">
                #if($proptool.getValueBoolean("showsettingbtn"))
               	 <a class="btn btn-primary" href="/hezi/scan?action=getreport" target="_blank" 
                  	style="margin-top:4px; display:none">报告</a>
                #end
                
                #if( $allforum.getTotalimagecount() > -1)
                  <a class="btn btn-primary" id="settingbtn" style="margin-top:4px">设置</a>
	            #end  
				  <a class="btn btn-primary" id="feedbackbtn" style="margin-top:4px" rel="leanModal" 
                  	name="feedback" href="#feedback">反馈</a> 
                </div>
                <div><img src="/hezi/images/slogan.jpg" width="341" height="37" /></div>
            </td>
          </tr>
        </table>
    </div>
    
	#parse("/settingemb.html")
    
    
    <div id="forumsdiv" >
        <table border="0" class="center width996">
        
          #foreach($groupitem in $groupslist)
          <!--group-->
          <tr class="grouptr">
            <td>
                <div style="color:#999;padding-top:10px;">
                    <h3>$groupitem.name  ($groupitem.getForumsInThisGroup().size())</h3>
                </div>
            </td>
            <td class="alignright" style="padding-top:10px;">
            #if($noScaninProcess)
                <a id="scanallbtn" class="batchscan btn btn-info" forumgroup="$groupitem.getId()" 
                	title="扫描并下载所有论坛的新帖子和新图片">扫描全部</a>
            #else
            	扫描进行中...
            #end
            
            #if($groupitem.getNewimagecount() > 0)
                <a id="viewallimagebtn" class="batchview btn btn-info" title="查看所有论坛的新图片">查看全部</a>
  			#end
            </td>
          </tr>
          
          
          
          
          <!--forums-->
          <tr>
            <td colspan="2">
            	#foreach($forumitem in $groupitem.getForumsInThisGroup() ) 
                <div class="span">
                  <div class="tile">
                    <h4 class="tile-title"><span>$forumitem.getId()  </span>$forumitem.name</h4>
                    <div class="forumsummary">
                       <table width="90%" border="0">
                          <tr>
                            <td class="alignright" width="40%">帖子数</td>
                            <td class="alignright" width="30%">$forumitem.summary.newpostcount</td>
                            <td> /</td>
                            <td style="text-align:left">$forumitem.summary.totalpostcount</td>
                          </tr>
                          <tr>
                            <td class="alignright">图片数</td>
                            <td class="alignright">$forumitem.summary.newimagecount</td>
                            <td> /</td>
                            <td style="text-align:left">$forumitem.summary.totalimagecount</td>
                          </tr>
                        </table>
                    </div>
                    #if($allforum.getTotalimagecount() > -1)
                        <a class="btn btn-info scanbtn" forum="$forumitem.getId()" title="扫描并下载本论坛新帖子和新图片" 
                        	id="scanbtn$forumitem.getId()">扫描</a>       
                    #end
                    #if($forumitem.summary.newimagecount > 0)
                   		<a class="btn btn-info viewbtn" forum="$forumitem.getId()" title="查看本论坛未读的图片" 
                        	id="viewbtn$forumitem.getId()">查看</a>
                    #end
                  </div><!--end of tile-->
                </div>
                
                #end<!--end of forum-->
                
                <a id="addforumbtn" rel="leanModal" name="addforuma" href="#addforumdiv" class="btn btn-info btn-large" 
                	style="margin-top:46px; margin-left:70px;">添加新论坛</a>
        
            </td>
          </tr>
          #end<!--end of group-->
        </table>
    </div>
    
    #parse("/feedback.html") 
</body>



<script language="javascript">
$(function(){
	$(".batchscan").click(function(){
		var forumgroup = $(this).attr("forumgroup");
		window.location.href="/hezi/scan?forumgroup="+forumgroup+"&windowwidth="+$(window).width();	
	});
	
	$(".batchview").click(function(){
		window.location.href="/hezi/picwall?forumgroup=allforum&windowwidth="+$(window).width();			
	});		

	$(".scanbtn").click(function(){
		var theforum = $(this).attr("forum");
		window.location.href="/hezi/scan?forum="+theforum+"&windowwidth="+$(window).width();	
	});
	
	$(".viewbtn").click(function(){
		var theforum = $(this).attr("forum");
		window.location.href="/hezi/picwall?forum="+theforum+"&windowwidth="+$(window).width();
	});
})
</script>


<style>
#forumsdiv td div.span{
	margin-left:8px;
	margin-right:8px;
}

#forumsdiv .tile{
	//margin-top:4px;
	margin-bottom:20px;
	width:210px;
	padding-top:8px;
	padding-bottom:8px;
	padding-left:10px;
	padding-right:10px;
	border:#1abc9c dotted 1px;
}

#forumsdiv .tile-title{
	border-bottom:#FFF dotted 2px;
	padding-top:10px;
	padding-bottom:10px;
	color:#063;
}

#forumsdiv .forumsummary{
	padding-top:18px;
	padding-bottom:18px;
	color:#1abc9c;
}
</style>
</html>
